def quick_pow(x,n):
    ans=1
    while n>0:
        if n&1:
            ans*=x
        x*=x
        n>>=1
    return ans
x=int(input())
n=int(input())
print(quick_pow(x,n))
